# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=d-spy
pkgver=1.6.0
pkgrel=2
pkgdesc="D-Bus debugger for GNOME"
url="https://gitlab.gnome.org/GNOME/d-spy"
arch=(x86_64)
license=(
  GPL3
  LGPL3
)
depends=(
  gtk4
  libadwaita
)
makedepends=(
  git
  meson
)
provides=(libdspy-1.so)
groups=(gnome-extra)
_commit=9268a01e3fcc7d15c617f4bb57f2fe213bb4d078  # tags/1.6.0^0
source=("git+https://gitlab.gnome.org/GNOME/d-spy.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd d-spy
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

build() {
  arch-meson d-spy build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
